/*******************************************************************************
 * Copyright (c) 2002 Boris Pruessmann and others. All rights reserved. This
 * program and the accompanying materials are made available under the terms of
 * the Common Public License v0.5 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors: Boris Pruessmann - Initial implementation.
 ******************************************************************************/
package net.sourceforge.perforce.core.internal.model;

import net.sourceforge.perforce.core.api.IPerforceServer;
import net.sourceforge.perforce.core.internal.Policy;

import org.eclipse.core.runtime.PlatformObject;

/**
 * @version $Revision: 488 $
 * @author <a href="mailto:bpruessmann@users.sourceforge.net">Boris
 *         Pruessmann</a>
 */
public class P4ModelObject extends PlatformObject {
  // ---------------------------------------------------------------------------
  // Private Variables

  /** Stores the Perforce Server. */
  private IPerforceServer server;

  // -------------------------------------------------------------------------
  // Public Constructors

  /**
   * Constructor for P4ModelObject.
   * 
   * @param theServer the Perforce server.
   */
  public P4ModelObject(IPerforceServer theServer) {
    // ==( PRE-CONDITION
    // )======================================================================
    Policy.assertNotNull(theServer);
    // ==( PRE-CONDITION
    // )======================================================================

    server = theServer;
  }

  //----------------------------------------------------------------------------
  // -- Public Methods

  /**
   * Returns the Perforce Server which the object belongs to.
   * 
   * @return the Perforce Server.
   */
  public IPerforceServer getServer() {
    return server;
  }
}
